/**
 * guid配置
 */
const setGuid = function () {
  const num = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f']
  var s1 = ''
  var s2 = ''
  var s3 = ''
  var s4 = ''
  var s5 = ''
  for (let i = 0; i < 8; i++) {
    var randomNum = Math.floor(Math.random() * 16)
    s1 += num[randomNum]
  }
  for (let i = 0; i < 4; i++) {
    var randomNum1 = Math.floor(Math.random() * 16)
    s2 += num[randomNum1]
  }
  for (let i = 0; i < 4; i++) {
    var randomNum2 = Math.floor(Math.random() * 16)
    s3 += num[randomNum2]
  }
  for (let i = 0; i < 4; i++) {
    var randomNum3 = Math.floor(Math.random() * 16)
    s4 += num[randomNum3]
  }
  for (let i = 0; i < 12; i++) {
    var randomNum4 = Math.floor(Math.random() * 16)
    s5 += num[randomNum4]
  }
  var guid = s1 + '-' + s2 + '-' + s3 + '-' + s4 + '-' + s5
  return guid
}
module.exports = setGuid
